//  错误信息提示
window.alertErrorMsg = function(txt) {
	$.NotificationApp.send("提示", txt, "mid-center", "rgba(0,0,0,0.2)","error");
};

//type error success warning info
/*function msg(msg, type){
	$.NotificationApp.send("提示", msg,"top-center","rgba(0,0,0,0.2)", type);
}*/

function msg(msg, type){
	$.NotificationApp.send("提示", msg,"top-center","rgba(0,0,0,0.2)", type);
}

//成功信息
function sucMsg(m){
	msg(m, "success");
}

//错误信息
function errMsg(m){
	msg(m, "error");
}

//警告信息
function warnMsg(m){
	msg(m, "warning");
}

//一般信息
function norMsg(msg){
	msg(msg, "info");
}

window.hideModal = function(selector) {
	$(selector).modal('hide');
}

window.showModal = function(selector) {
	$(selector).modal('show');
}

// 确认弹窗
// 只绑定一次
var affcallback;
function confirmdemo(cont, callback) {
	$("#deleteDateModel .data_cont").text(cont);
	showModal("#deleteDateModel");
	affcallback = callback;
}
$("#deleteDateModel ").on("click",".deleteAff", function(){
	affcallback.call();
	hideModal("#deleteDateModel");
});

// 每调一次绑定一次
function confirmBind(cont, callback) {
	$("#deleteDateModel .data_cont").text(cont);
	showModal("#deleteDateModel");
	$("#deleteDateModel").on("click",".deleteAff", function(){
		callback.call();
		hideModal("#deleteDateModel");
	});
}